package com.qk.management.mapper;

import com.qk.entity.Activity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author kaoM1Jy
 * @date 2025/10/9 17:28
 * @description:
 */
@Mapper
@SuppressWarnings("all")
public interface ActivityMapper {

    @Select("select * from activity where type = #{type}")
    List<Activity> getByType(Integer type);

    void update(Activity activity);

    void insert(Activity activity);

  @Select("select * from activity where id = #{id}")
    Activity getByID(Integer id);

    @Delete("delete from activity where id = #{id}")
    void deleteByID(Integer id);

    Integer count(Integer channel, Integer type, Integer status);

    List<Activity> select(Integer channel, Integer type, Integer status, Integer offset, Integer pageSize);


}
